package com.xnx3.wangmarket.plugin.innerDown.controller.admin;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import com.xnx3.wangmarket.plugin.base.controller.BasePluginController;
import com.xnx3.wangmarket.plugin.kefu_domain.entity.Kefu;
import com.xnx3.wangmarket.plugin.kefu_domain.bean.MQBean;
import com.xnx3.j2ee.entity.User;
import com.xnx3.j2ee.func.AttachmentFile;
import com.xnx3.j2ee.service.SqlService;
import com.xnx3.j2ee.vo.BaseVO;
import com.xnx3.j2ee.vo.UploadFileVO;
import com.xnx3.wangmarket.admin.entity.Site;
import com.xnx3.wangmarket.admin.util.AliyunLog;
import com.xnx3.wangmarket.domain.mq.DomainMQ;

/**
 * 下载系统，首页、欢迎页面
 * @author 管雷鸣
 */
@Controller
@RequestMapping("/plugin/innerDown/admin/")
public class AdminInnerDownPluginController extends BasePluginController{
	@Resource
	private SqlService sqlService;
	
	
	/**
	 * 总管理后台首页
	 */
	@RequestMapping("index${url.suffix}")
	public String index(Model model){
		if(!haveSuperAdminAuth()){
			//超级管理员
			return error(model, "无权使用");
		}
		User user = getUser();
		
		AliyunLog.addActionLog(user.getId(), "进入下载系统innerDown总管理后台首页");
		
		return "plugin/innerDown/admin/index";
	}
	
	/**
	 * 总管理后台欢迎页面
	 */
	@RequestMapping("welcome${url.suffix}")
	public String welcome(Model model){
		if(!haveSuperAdminAuth()){
			//超级管理员
			return error(model, "无权使用");
		}
		User user = getUser();
		
		AliyunLog.addActionLog(user.getId(), "进入下载系统innerDown总管理后台欢迎页面");
		return "plugin/innerDown/admin/welcome";
	}
	

}
